package com.hhit.bigscreenbackmanage.controller.tgygl;

import com.alibaba.fastjson.JSONObject;
import com.hhit.bigscreenbackmanage.common.Response;
import com.hhit.bigscreenbackmanage.entity.tgygl.TTgyglProgressComparisonYc;
import com.hhit.bigscreenbackmanage.service.tgygl.TTgyglProgressComparisonYcService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/tgygl/progressComparisonYc")
public class ProgressComparisonYcController {

    private Logger log = LoggerFactory.getLogger(ProgressComparisonYcController.class);

    @Autowired
    TTgyglProgressComparisonYcService tTgyglProgressComparisonYcService;

    /**
     * 查询 进度完成情况统计
     * @param jsonObject
     * @return
     */
    @RequestMapping("/getJdwcqkCount")
    public Response getJdwcqkCount(@RequestBody JSONObject jsonObject){
        try{
            Map<String, Object> result = tTgyglProgressComparisonYcService.queryJdwcqkCount(jsonObject);
            return Response.createResponseBySuccess("查询进度完成情况统计成功",result);
        }catch (Exception e){
            log.error("查询进度完成情况统计失败: " + e.getMessage());
            return Response.createResponseByError("查询进度完成情况统计失败");
        }
    }

}
